<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../../assets/animate/animate.css">
    <style>
        body{
            padding-bottom: 800px;
            padding-left: 30px;
        }
        .box,.box1,.box2{
            width: 300px;
            height: 150px;
            background-color: burlywood;
            overflow: hidden;
            white-space: nowrap;
        }
        .box1{
            background-color: rosybrown;
            display: inline-block;
        }
        .box2{
            background-color: yellowgreen;
            display: inline-block;
        }
        .show{
            opacity: 1;
            width: 300px;
        }
        .active{
            transition: all ease 2s;
        }
        .hide{
            opacity: 0;
            width: 0px;
        }
        .list{
            list-style: none;
            padding: 0px;
            margin: 0px;
        }
        .list li{
            background-color: #dedede;
            margin: 4px 0px;
            padding: 4px 10px;
            display: flex;
            flex-flow: row nowrap;
            justify-content: space-between;
        }
        .list li span:last-child{
            cursor: pointer;
        }
        .li-active{
            transition: all ease 2s;
        }
        .li-hide{
            opacity: 0;
            transform: translateX(60%);
        }
    </style>
</head>
<body>
    <!-- https://animate.style/ -->
    <div id="app">
        <input type="button" value="显示元素" @click="flag=true">
        <input type="button" value="隐藏元素" @click="flag=false">
        <br><br>
        <!-- <transition
            leave-active-class="animate__animated animate__bounceOutDown"
            enter-active-class="animate__animated animate__bounceInDown"
        >
            <div class="box" v-show="flag">
                元素容器
            </div>
        </transition> -->
        <transition
            leave-active-class="animate__bounceOutDown"
            enter-active-class="animate__bounceInDown"
        >
            <div class="box animate__animated" v-show="flag">
                元素容器
            </div>
        </transition>
    </div>
    <script type="module">
        // 加载 Vue3 的ESM 模块文件
        import { createApp } from "../../assets/vue3/vue.esm-browser.js"
        createApp({
            data(){
                return {
                    flag:true,
                }
            }
        }).mount("#app")
    </script>
</body>
</html>